home *** CD-ROM | disk | FTP | other *** search
/ Informática Multimedia 1995 April / Informatica Multimedia CD - Epimundo.iso / DOS / FILEFIND / SEAR.ZIP / SEAR.DOC < prev    next >
Encoding:
Text File  |  1993-12-30  |  2.4 KB  |  55 lines

  1. Sear.Doc                                                 (c)Cybanim 9 Oct 1993
  2.  
  3. SEAR.EXE is a search program that looks for a string in a file or files.
  4. It is written to replace or supplement GREP.COM.
  5.  
  6. Usage:
  7.  
  8.   SEAR  -options  target   filespec
  9.  
  10. Searches filespec for target.
  11.  
  12. target is a string, optionally enclosed in double quotes.
  13. filespec is a file name, with optional wild characters * ?
  14. If filespec starts with @ it is a list of files to search
  15.  
  16. SEAR does not have "Regular Expression" options like GREP
  17. The only options are:
  18.    l display filenames only       (default = display 79 chars around a find)
  19.    i case insensitive             (default = case sensitive )
  20.    d examine sub directories      (default = current directory only)
  21. options are entered  -lid   or   -l -d -i   or   /lid   or   /l /i /d
  22.  
  23. version 1.3:   searches files bigger than 64K
  24.                searches subdirectories if wild character in filename
  25.  
  26.  
  27. I wrote SEAR because GREP has two weak points:
  28.    1) GREP is line oriented, it may not display results from non-text files.
  29.       SEAR can search any file, it displays the results on one line per find
  30.       with the target at column 40 and non-printable characters replaced with
  31.       a dot. This is useful for some files with text contents but non-standard
  32.       line formats, eg database and PCO files.
  33.    2) GREP can only examine a list of files if they are on the command line.
  34.       SEAR can examine a list of files in a textfile
  35.       eg SEAR target @filist.tmp looks at all the files in a filist.tmp.
  36.       SEAR is designed to examine the output of GREP.
  37.       If the files from GREP are output to a list via:
  38.              GREP -o target filespec >filist.tmp
  39.       filist.tmp contains one line for each file where target was found
  40.       SEAR targetb @filist.tmp  will examine all the files in filist.tmp.
  41.  
  42. SEAR uses the Boyer-Moore Search Algorithm described in
  43.   "Algorithms" by Robert Sedgewick 2ed 1989 Addison-Wesley   (page 287)
  44. SEAR.EXE is copyright Cybanim Pty Ltd 9 Oct 1993
  45. If SEAR.EXE is not modified and not charged for it may be copied and
  46. distributed and used without fee.
  47.  
  48. Updates:
  49. Ver 1.3  searches large files   (previous versions only searched files < 64K )
  50.          searches sub-directories with wild-characters in file name.
  51.  
  52.     Christopher T Skinner
  53.     Cybanim Pty Ltd
  54.     4/29B Nelson St   Woollahra   NSW 2025   Australia
  55.     tel(02)3635884    Compuserve 100033,132  100033.132@compuserve.com